//
//  PresenDetailViewController.m
//  MMLOOK
//
//  Created by 刘鹏程 on 15/8/31.
//  Copyright (c) 2015年 武俊娥. All rights reserved.
//

#import "PresenDetailViewController.h"

@interface PresenDetailViewController ()<UIWebViewDelegate>

@property (nonatomic, retain)UIWebView *WebView;

@end

@implementation PresenDetailViewController

- (void)dealloc
{
    _WebView.delegate = nil;
    [_webDic release];
    [_WebView release];
    [super dealloc];
}

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.webDic = [NSMutableDictionary dictionary];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self creatWebView];
}

- (void)creatWebView
{
    self.WebView = [[[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)] autorelease];
    NSURLRequest *request = [[[NSURLRequest alloc] initWithURL:[NSURL URLWithString:[self.webDic objectForKey:@"url"]]] autorelease];
    [_WebView loadRequest:request];
    
    _WebView.delegate = self;
    
    [self.view addSubview:_WebView];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
